package com.scfire.cert

import com.paic.qhcs.util.entry.ResultEntry
import com.scfire.security.*;
/**
 * 信用评分信息
 * Copyright 2015 Shudao Info Tech Co. Ltd. All rights reserved.
 * @author XSunny
 * @date 2015年10月23日 下午2:16:25
 * @version V1.0
 * 
 *
 */
class CreditRank {
	
	String idNo;
	String name;
	
	//来源代码
	String sourceId;
	//可度分
	String credooScore;
	//个人信息评分
	String bseInfoScore;
	//金融需求评分
	String finRequireScore;
	//还款能力评分
	String payAbilityScore;
	//信用履约评分
	String performScore;
	//行为数据评分
	String actionScore;
	//虚拟资产评分
	String virAssetScore;
	//成长性评分
	String trendScore;
	//查询时间
	String dataBuildTime;
	
	static belongsTo = [member:Member]
	
	public CreditRank(){}
	public CreditRank(ResultEntry entry){
		this.idNo = entry.idNo;
		this.name = entry.name;
		this.sourceId = entry.sourceId;
		this.credooScore = entry.credooScore;
		this.bseInfoScore = entry.bseInfoScore;
		this.finRequireScore = entry.finRequireScore;
		this.payAbilityScore = entry.payAbilityScore;
		this.performScore = entry.performScore;
		this.actionScore = entry.actionScore;
		this.virAssetScore = entry.virAssetScore;
		this.trendScore = entry.trendScore;
		this.dataBuildTime = entry.dataBuildTime;
	}
	
	public transform(ResultEntry entry){
		this.idNo = entry.idNo;
		this.name = entry.name;
		this.sourceId = entry.sourceId;
		this.credooScore = entry.credooScore;
		this.bseInfoScore = entry.bseInfoScore;
		this.finRequireScore = entry.finRequireScore;
		this.payAbilityScore = entry.payAbilityScore;
		this.performScore = entry.performScore;
		this.actionScore = entry.actionScore;
		this.virAssetScore = entry.virAssetScore;
		this.trendScore = entry.trendScore;
		this.dataBuildTime = entry.dataBuildTime;
	}

    static constraints = {
		
		idNo nullable:true, unique : true
		name nullable:true
			
		sourceId nullable:true
		credooScore nullable:true
		bseInfoScore nullable:true
		finRequireScore nullable:true
		payAbilityScore nullable:true
		performScore nullable:true
		actionScore nullable:true
		virAssetScore nullable:true
		trendScore nullable:true
		dataBuildTime nullable:true
		
		member nullable:true
    }
}
